<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width, user-scalable=no" />

	<title>iTransmogrify! Redirector</title>
	<style type="text/css" media="screen">
    body {
        background: #000;
        color: #ccc;
        margin: 40px 0;
        text-align: center;
        font-family: helvetica,sans-serif;
    }
    .title { font-size:18pt; line-height:24pt; }
    a { color:#48643F; }
    a img { border:none; margin:15px auto 5px; }
    .d { font-size:12pt; line-height:14pt; }
    .go a { font-size:9pt; }
	</style>
</head>

<body>

<div class='title'>
    <strong><a href="http://iTransmogrify.googlecode.com" title="iTransmogrify! Redirector">iTransmogrify</a></strong>
    <br />
    YouTube Redirector 
</div>

<script type="text/javascript" charset="utf-8">   
   if ( (document.referrer) && ( YTid = /YTid=([^ .?=&]{11})/.exec(window.location.search) ) ) {
       var newURL = 'http://www.youtube.com/watch?v=' + YTid[1];
       document.write('<div><a href="' + newURL + '"><img src="http://itransmogrify.googlecode.com/svn/trunk/images/play.png" alt="iTransmogrify!" style="width: 141px; height: 142px;"/></a></div>\
                       <div class="d go">Redirecting to: <br /><a href="' + newURL + '">' + newURL + '</a></div>');
       setTimeout( function(){ window.location = newURL }, 120 );
   } else {
       document.write('<div><a href="javascript:history.go(-1)"><img src="http://itransmogrify.googlecode.com/svn/trunk/images/play.png" alt="iTransmogrify!" style="width: 141px; height: 142px;"/></a></div>');
       if ( document.referrer ) document.write( '<div class="d">Invalid YouTube ID</div>' );
   }
</script>

</body>
</html>
